//函数可以把一些运算功能抽取出来作为函数，直接调用
//(xxx/32)*1rem
@function p2r($size){
    @return ($size/32)*1rem;
}

@mixin bgc($url,$width){
    background: url($url) no-repeat center /100% 100%;
    position: absolute;
    left: 50%;
    margin-left: p2r(-$width/2);
}

@mixin bg($url){
    background: url($url) no-repeat center /100% 100%;
    position: absolute;
}

@mixin size($width,$height){
    width: p2r($width);
    height: p2r($height);
}


html {
    @include bgc('../images/page1/hello.png',200);
    @include size(100,200);
}